There is a technology for automatically identifying a target (or an area) which a user desires to extract from image data. In this technology, in order to instruct a system what portion a user desires to extract as the target (or the area), a certain amount of labeling is manually conducted as initial values by the user, and then, the system automatically divides remaining portions by using the initial values. When the automatic dividing result includes an error, the system automatically re-divides the remaining portions, again (for example, see Patent Document 1 and Non-Patent Document 1).
FIG. 1A through FIG. 1E are diagrams for explaining a related art example. As illustrated in FIG. 1A, when the user encloses an extraction target by a frame 401, the system samples pixel value data 402 of a foreground from the entire inside area indicated by the frame 401, and creates a distribution model of the pixel value data 402 of the foreground in a Red, Green, and Blue (RGB) color space. Moreover, the system samples pixel value data 403 of a background from the entire outside area of the frame 401, and creates a distribution model of the pixel value data 403 of the background. The foreground or the background is determined based on whether an area is desired to be extracted, but is not determined based on a positional relationship.
After that, the foreground and the background are automatically divided by using distribution models of the foreground and the background which are created by the system. However, it is difficult to automatically and completely divide the foreground and the background in the above described technology. As illustrated in FIG. 1C, for example, an automatic division may easily cause an error for areas 406 and 407 where pixel values are close to each other, regarding a foreground area 404 of a front tomato and a background area 405 of a rear tomato. The area 406 is an area of the background erroneously divided as the foreground, and the area 407 is another an area of the foreground erroneously divided as the background.
As illustrated in FIG. 1D, the user modifies an area. A foreground marker 407a (which may be a white marker) is input to the area 407 erroneously divided as the background, and a background marker 406a (which may be a black marker) is input to the area 406 erroneously divided as the foreground. Since the automatic division is conducted again from the distribution models later, it is not required to completely modify a wrong area. By simply applying a modification marker to a portion of the wrong area, a marked area is expanded to modify the wrong area. The system samples the pixel value data from the foreground marker 407a and the foreground area 404 which is automatically divided. As illustrated in FIG. 1B, the system re-creates a distribution model 408 of pixels of the foreground in the RGB color space. Also, the system samples the pixel value data from the background marker 406a and the background area 405 which is automatically divided, and re-creates distribution models 409 of pixels of the background. Then, by using the distribution models 408 and 409 with respect to the foreground and the background which are re-created by the system and an algorithm for minimizing energy of a graph structure, as illustrated in FIG. 1E, the foreground and the background are automatically re-divided. In a case in which an error 410 still remains in a result from automatically re-dividing, a modification process from an operation depicted in FIG. 1D is repeated until there is a result in which the user satisfaction is acquired.    Patent Document 1: Japanese National Publication of International Patent Application No. 2009-545052    Non-Patent Document 1: C. Rother, V. Kolmogorv, A. Blake, “Interactive Foreground Extraction Using Iterated Graph Cuts”, GrabCut, ACM Transactions on Graphics (SIGGRAPH'04), vol. 23, no. 3, pp. 309-314, 2004    Non-Patent Document 2: Vincent, Luc, and Pierre Soille, “Watersheds in Digital Spaces: An Efficient Algorithm Based on Immersion Simulations”, IEEE Transactions of Pattern Analysis and Machine Intelligence, Vol. 13, No. 6, pp. 583-598, June 1991